<template>
  <div class="box">
    <div
      v-for="(item, index) in list"
      :key="index"
      @click="liang(index)"
      :class="{ static: statice == index }"
    >
      {{ item.name }}
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      statice: 0,
      list: [
        { name: "首页" },
        { name: "爆爆团" },
        { name: "订单" },
        { name: "我的" },
      ],
    };
  },
  methods: {
    liang(index) {
      this.statice = index;
    },
  },
};
</script>

<style scoped>
.box {
  display: flex;
  justify-content: space-around;
  background-color: white;
  position: fixed;
  width: 100%;
  height: 40px;
  bottom: 0;
  border-top: 1px solid gray;
  align-items: center;
  font-size: 12px;
}
.box .static {
  color: aqua;
}
</style>